package org.zlpt.entity.co;

import lombok.Data;
import org.hyperledger.fabric.contract.annotation.DataType;
import org.hyperledger.fabric.contract.annotation.Property;

import java.util.Date;

@Data
@DataType
public final class EquipmentCO {


    public static final String keyPrefiex = "ems_equipment:";
    //设备id
    @Property
    private Long equipmentId;
    //设备型号id
    @Property
    private Long equipmentModelId;
    //设备型号编码
    @Property
    private String equipmentModelCode;
    //设备类型id
    @Property
    private Long equipmentTypeId;
    //设备标识码
    @Property
    private String equipmentCode;
    //设备品牌id
    @Property
    private Long equpimentBrandId;
    //设备拥有者id
    @Property
    private Long equipmentOwnerId;
    //设备所在地址编号
    @Property
    private String equipmentAddressCode;
    //设备状态
    @Property
    private Integer equipmentStatus;
    //新增人id
    @Property
    private Long createBy;
    //新增时间
    @Property
    private Date createTime;
    //修改人id
    @Property
    private Long updateBy;
    //修改时间
    @Property
    private Date updateTime;


    public String formKey() {
        return keyPrefiex + equipmentId;
    }
    public static String formKey(Long userId) {
        return keyPrefiex + userId;
    }
}
